import React,{Component} from "react";
import './style.scss'
// import classnames from 'classnames'
class DemoClassArr extends Component {
  state = { 
    show:true
   } 
  render() { 
    return (
      <div>
         动态class-数组方式:
         <div className="classA">颜色</div>
         <div className={[this.state.show?'classA':'classC classD','classB'].join('')}>颜色?</div>
         {this.state.show}
      </div>
    );
  }
}
 
export default DemoClassArr;